<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{:isset($info['id'])?'编辑':'新增'}地区</h2>
    </div>
    <form action="{:U()}" method="post" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">名称</label>
            <div class="controls">
                <input type="text" class="text input-large" name="name" value="{$info.name|default=''}">
            </div>
        </div>
       
        <div class="form-item">
            <label class="item-label">上级地区<span class="check-tips">（所属的上级地区）</span></label>
            <div class="controls">
               <input type="hidden" name="pid" value="{$info.pid}">
               <input type="hidden" name="level" value="{$info.level}">
               {$info.pid|get_district_name}
               <empty name="info.pid">
               	顶级地区
               </empty>
            </div>
        </div>
       
        <div class="form-item">
            <input type="hidden" name="id" value="{$info.id|default=''}">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        Think.setValue("pid", {$info.pid|default = 0});
        Think.setValue("hide", {$info.hide|default = 0});
        Think.setValue("is_dev", {$info.is_dev|default = 0});
        //导航高亮
        highlight_subnav('{:U('index')}');
    </script>
</block>